﻿using System;
using CI.PW.Models;

namespace CI.PW.Controls
{
    /// <summary>
    /// Class for the edges in diagrams
    /// </summary>
    public class EdgeSynapse : QuickGraph.IEdge<object>
    {
        /// <summary>
        /// Source Node
        /// </summary>
        public object Source { get; private set; }

        /// <summary>
        /// Target Node
        /// </summary>
        public object Target { get; private set; }

        /// <summary>
        /// Edge synapse
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public EdgeSynapse(object source, object target)
        {
            #region Argument Checker
            // check source argument
            if (!(source is VertexModel))
                throw new ArgumentException("source");

            // check target argument
            if (!(target is VertexModel))
                throw new ArgumentException("target");
            #endregion

            Source = source;
            Target = target;
        }
    }
}


